package com.zb.controller;

import com.zb.entity.SkuDtoES;
import com.zb.repository.SkuRepository;
import com.zb.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/tb-search-model")
public class SearchController {
    @Autowired
    SearchService searchService;

    @Autowired
    SkuRepository skuRepository;
    @PostMapping("/search")
    public Map<String, Object> search(Map<String, String> param) throws Exception {
        Map<String, Object> search = skuRepository.search(param);
        return search;
    }
    @GetMapping("/addInfo")
    public boolean addInfo(@RequestParam("id") String id){
        Boolean b = searchService.addInfo(id);
        return b;
    }


}
